

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Application Structure &mdash; Industrial Training  documentation</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  

  
    <link rel="stylesheet" href="../../_static/override.css" type="text/css" />
  

  
        <link rel="index" title="Index"
              href="../../genindex.html"/>
        <link rel="search" title="Search" href="../../search.html"/>
    <link rel="top" title="Industrial Training  documentation" href="../../index.html"/>
        <link rel="up" title="Application Demo 2 - Descartes Planning and Execution" href="index.html"/>
        <link rel="next" title="General Instructions" href="General-Instructions.html"/>
        <link rel="prev" title="Introduction" href="Introduction.html"/> 

  
  <script src="../../_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">
  
  <script src="../../_static/js/clipboard.min.js"></script>

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-nav-search">
        

        
          <a href="../../index.html" class="icon icon-home">
        

          ROS-Industrial Training Material<br/>kinetic

        
        </a>

        
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

        
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        
          
          
              <ul>
<li class="toctree-l1"><a class="reference internal" href="../setup/PC-Setup---ROS-Kinetic.html">PC Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../setup/PC-Setup---ROS-Kinetic.html#virtual-machine-configuration-recommended">Virtual Machine Configuration (<strong>Recommended</strong>)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../setup/PC-Setup---ROS-Kinetic.html#limitations-of-virtual-box">Limitations of Virtual Box</a></li>
<li class="toctree-l3"><a class="reference internal" href="../setup/PC-Setup---ROS-Kinetic.html#common-vm-issues">Common VM Issues</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../setup/PC-Setup---ROS-Kinetic.html#direct-linux-pc-configuration-not-recommended">Direct Linux PC Configuration (<strong>NOT Recommended</strong>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../setup/PC-Setup---ROS-Kinetic.html#configuration-check">Configuration Check</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference external" href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-096-introduction-to-c-january-iap-2011/assignments/">MIT Introduction to C++</a></li>
<li class="toctree-l1"><a class="reference external" href="http://mindview.net/Books/TICPP/ThinkingInCPP2e.html">Bruce Eckel Thinking in C++</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../prerequisites/Navigating-the-Ubuntu-GUI.html">Exercise 0.1 - Intro to Ubuntu GUI</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/Navigating-the-Ubuntu-GUI.html#task-0-presentation-slides">Task 0: Presentation Slides</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/Navigating-the-Ubuntu-GUI.html#task-1-familiarize-yourself-with-the-ubuntu-desktop">Task 1: Familiarize Yourself with the Ubuntu Desktop</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/Navigating-the-Ubuntu-GUI.html#task-2-open-and-inspect-an-application">Task 2: Open and Inspect an Application</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/Navigating-the-Ubuntu-GUI.html#task-3-start-an-application-pin-it-to-the-launcher-bar">Task 3: Start an Application &amp; Pin it to the Launcher Bar</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../prerequisites/Exploring-the-Linux-File-System.html">Exercise 0.2 - The Linux File System</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/Exploring-the-Linux-File-System.html#using-the-file-browser-to-navigate">Using the File Browser to Navigate</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/Exploring-the-Linux-File-System.html#making-changes">Making Changes</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../prerequisites/Exploring-the-Linux-File-System.html#copying-moving-and-removing-files">Copying, Moving, and Removing Files</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html">Starting the Terminal</a></li>
<li class="toctree-l1"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#navigating-directories-and-listing-files">Navigating Directories and Listing Files</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#prepare-your-environment">Prepare your environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#ls-command">ls Command</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#pwd-and-cd-commands"><code class="docutils literal"><span class="pre">pwd</span></code> and <code class="docutils literal"><span class="pre">cd</span></code> Commands</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#altering-files">Altering Files</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#mv-command">mv Command</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#cp-command">cp Command</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#rm-command">rm Command</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#mkdir-command">mkdir Command</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#job-management">Job management</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#stopping-jobs">Stopping Jobs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#stopping-out-of-control-jobs">Stopping “Out of Control” Jobs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#showing-process-and-memory-usage">Showing Process and Memory usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#editing-text-and-other-gui-commands">Editing Text (and Other GUI Commands)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../prerequisites/The-Linux-Terminal.html#running-commands-as-root">Running Commands as Root</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../session1/ROS-Setup.html">Exercise 1.0 - ROS Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session1/ROS-Setup.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/ROS-Setup.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/ROS-Setup.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/ROS-Setup.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/ROS-Setup.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session1/ROS-Setup.html#setup-bashrc">Setup ~/.bashrc</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/ROS-Setup.html#starting-roscore">Starting roscore</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html">Exercise 1.1 - Create a Workspace</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session1/Create-Catkin-Workspace.html#create-a-catkin-workspace">Create a Catkin Workspace</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session1/Installing-Existing-Packages.html">Exercise 1.2 - Installing Packages</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#install-package-from-apt-repository">Install Package from apt Repository</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/Installing-Existing-Packages.html#download-and-build-a-package-from-source">Download and Build a Package from Source</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html">Exercise 1.3 - Packages and Nodes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#create-a-package">Create a Package</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#stop-we-ll-go-through-a-few-more-lecture-slides-before-continuing-this-exercise">STOP!  We’ll go through a few more lecture slides before continuing this exercise.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#create-a-node">Create a Node</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#run-a-node">Run a Node</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/Creating-a-ROS-Package-and-Node.html#challenge">Challenge</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session1/Topics-and-Messages.html">Exercise 1.4 - Topics and Messages</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session1/Topics-and-Messages.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Topics-and-Messages.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Topics-and-Messages.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Topics-and-Messages.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Topics-and-Messages.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session1/Topics-and-Messages.html#add-the-fake-ar-publisher-package-as-a-dependency">Add the fake_ar_publisher Package as a Dependency</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session1/Topics-and-Messages.html#run-a-publisher-node">Run a Publisher Node</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../session1/Topics-and-Messages.html#create-a-subscriber-node">Create a Subscriber Node</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../session2/Services.html">Exercise 2.0 - Services</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session2/Services.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Services.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Services.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Services.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Services.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session2/Services.html#create-service-definition">Create Service Definition</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session2/Services.html#service-server">Service Server</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session2/Services.html#service-client">Service Client</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session2/Services.html#use-new-service">Use New Service</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session2/Actions.html">Exercise 2.1 - Actions</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session2/Actions.html#ros-tutorials-for-c-action-client-server-usage">ROS Tutorials for C++ Action Client/Server usage</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session2/Launch-Files.html">Exercise 2.2 - Launch Files</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session2/Launch-Files.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Launch-Files.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Launch-Files.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Launch-Files.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Launch-Files.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session2/Parameters.html">Exercise 2.3 - Parameters</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session2/Parameters.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Parameters.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Parameters.html#further-information-and-resource">Further Information and Resource</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Parameters.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session2/Parameters.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../session3/Intro-to-URDF.html">Exercise 3.0 - Intro to URDF</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session3/Intro-to-URDF.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Intro-to-URDF.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Intro-to-URDF.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Intro-to-URDF.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Intro-to-URDF.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session3/Workcell-XACRO.html">Exercise 3.1 - Workcell XACRO</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session3/Workcell-XACRO.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Workcell-XACRO.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Workcell-XACRO.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Workcell-XACRO.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Workcell-XACRO.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session3/Coordinate-Transforms-using-TF.html">Exercise 3.2 - Transforms using TF</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session3/Coordinate-Transforms-using-TF.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Coordinate-Transforms-using-TF.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Coordinate-Transforms-using-TF.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Coordinate-Transforms-using-TF.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Coordinate-Transforms-using-TF.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html">Exercise 3.3 - Build a MoveIt! Package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Build-a-Moveit!-Package.html#using-moveit-with-physical-hardware">Using MoveIt! with Physical Hardware</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session3/Motion-Planning-RVIZ.html">Exercise 3.4 - Motion Planning using RViz</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session3/Motion-Planning-RVIZ.html#launch-the-planning-environment">Launch the Planning Environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Motion-Planning-RVIZ.html#plugin-display-options">Plugin Display Options</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Motion-Planning-RVIZ.html#basic-motion">Basic Motion</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session3/Motion-Planning-RVIZ.html#beyond-the-basics">Beyond the Basics</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../session4/Motion-Planning-CPP.html">Exercise 4.0 - Motion Planning using C++</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session4/Motion-Planning-CPP.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Motion-Planning-CPP.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Motion-Planning-CPP.html#further-information-and-resources">3. Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Motion-Planning-CPP.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Motion-Planning-CPP.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session4/Descartes-Path-Planning.html">Exercise 4.1 - Intro to Descartes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#setup-workspace">Setup workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#complete-descartes-node">Complete Descartes Node</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#update-workcell-node">Update Workcell Node</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#test-full-application">Test Full Application</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Descartes-Path-Planning.html#hints-and-help">Hints and Help</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session4/Introduction-to-Perception.html">Exercise 4.2 - Intro to Perception</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session4/Introduction-to-Perception.html#point-cloud-data-file">Point Cloud Data File</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Introduction-to-Perception.html#display-the-point-cloud-in-rviz">Display the point cloud in RViz</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session4/Introduction-to-Perception.html#experiment-with-pcl">Experiment with PCL</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session4/Introduction-to-Perception.html#downsample-the-point-cloud-using-the-pcl-voxel-grid">Downsample the point cloud using the pcl_voxel_grid.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Introduction-to-Perception.html#extracting-the-table-surface-from-point-cloud-using-the-pcl-sac-segmentation-plane">Extracting the table surface from point cloud using the pcl_sac_segmentation_plane.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Introduction-to-Perception.html#extracting-the-largest-cluster-on-the-table-from-point-cloud-using-the-pcl-sac-segmentation-plane">Extracting the largest cluster on the table from point cloud using the pcl_sac_segmentation_plane.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Introduction-to-Perception.html#remove-outliers-from-the-cloud-using-the-pcl-outlier-removal">Remove outliers from the cloud using the pcl_outlier_removal.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Introduction-to-Perception.html#compute-the-normals-for-each-point-in-the-point-cloud-using-the-pcl-normal-estimation">Compute the normals for each point in the point cloud using the pcl_normal_estimation.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session4/Introduction-to-Perception.html#mesh-a-point-cloud-using-the-marching-cubes-reconstruction">Mesh a point cloud using the marching cubes reconstruction.</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../demo1/index.html">      Demo 1 - Perception-Driven Manipulation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Introduction.html">Demo 1.0 - Introduction</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Introduction.html#goal">Goal</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Introduction.html#objectives">Objectives</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Inspect-the-package.html">Demo 1.1 - Inspect the &quot;pick_and_place_exercise&quot; Package</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#acquire-and-initialize-the-workspace">Acquire and initialize the Workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#download-source-dependencies">Download source dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#download-debian-dependencies">Download debian dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#build-your-workspace">Build your workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#source-the-workspace">Source the workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#locate-and-navigate-into-the-package">Locate and navigate into the package</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#look-into-each-file-in-the-launch-directory">Look into each file in the launch directory</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#look-into-the-config-directory">Look into the config directory</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Inspect-the-package.html#look-into-the-src-directory">Look into the src directory</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Package-Setup.html">Demo 1.2 - Package Setup</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Package-Setup.html#build-package-dependencies">Build Package Dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Package-Setup.html#import-package-into-qtcreator">Import Package into QTCreator</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Package-Setup.html#open-the-main-thread-source-file">Open the Main Thread Source File</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Bring-up-ROS-system-in-simulation-mode.html">Demo 1.3 - Start in Simulation Mode</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Bring-up-ROS-system-in-simulation-mode.html#run-setup-launch-file-in-simulation-mode-simulated-robot-and-sensor">Run setup launch file in simulation mode (simulated robot and sensor)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Bring-up-ROS-system-in-simulation-mode.html#setup-for-real-sensor-and-simulated-robot">Setup for real sensor and simulated robot</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Bring-up-ROS-system-in-simulation-mode.html#setup-for-real-robot-and-simulated-sensor-data">Setup for real robot and simulated sensor data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Bring-up-ROS-system-in-simulation-mode.html#setup-for-real-robot-and-real-sensor">Setup for real robot and real sensor</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Initialization-and-global-variables.html">Demo 1.4 - Initialization and Global Variables</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Initialization-and-global-variables.html#application-variables">Application Variables</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Initialization-and-global-variables.html#node-initialization">Node Initialization</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Move-arm-to-wait-position.html">Demo 1.5 - Move Arm to Wait Position</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Move-arm-to-wait-position.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Move-arm-to-wait-position.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Move-arm-to-wait-position.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Move-arm-to-wait-position.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Open-gripper.html">Demo 1.6 - Open Gripper</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Open-gripper.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Open-gripper.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Open-gripper.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Open-gripper.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Detect-box-pick-point.html">Demo 1.7 - Detect Box Pick Point</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Detect-box-pick-point.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Detect-box-pick-point.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Detect-box-pick-point.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Detect-box-pick-point.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Create-pick-moves.html">Demo 1.8 - Create Pick Moves</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-pick-moves.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-pick-moves.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-pick-moves.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-pick-moves.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Pick-up-box.html">Demo 1.9 - Pick Up Box</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Pick-up-box.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Pick-up-box.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Pick-up-box.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Pick-up-box.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Create-place-moves.html">Demo 1.10 - Create Place Moves</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-place-moves.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-place-moves.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-place-moves.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Create-place-moves.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../demo1/Place-box.html">Demo 1.11 - Place Box</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Place-box.html#locate-function">Locate Function</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Place-box.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Place-box.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="../demo1/Place-box.html#api-references">API References</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Demo 2 - Descartes Planning and Execution</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="Introduction.html">Demo 2.0 - Introduction</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Introduction.html#goal">Goal</a></li>
<li class="toctree-l3"><a class="reference internal" href="Introduction.html#objectives">Objectives</a></li>
</ul>
</li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Demo 2.1 - Application Structure</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#acquire-and-initialize-the-workspace">Acquire and initialize the Workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="#download-source-dependencies">Download source dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="#download-debian-dependencies">Download debian dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="#build-your-workspace">Build your workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="#source-the-workspace">Source the workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="#list-all-the-packages-in-the-application">List All the Packages in the Application</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-plan-and-run-package">The <code class="docutils literal"><span class="pre">plan_and_run</span></code> package</a></li>
<li class="toctree-l3"><a class="reference internal" href="#main-application-source-file">Main Application Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-demoapplication-class">The DemoApplication Class</a></li>
<li class="toctree-l3"><a class="reference internal" href="#application-launch-file">Application Launch File</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="General-Instructions.html">Demo 2.2 - General Instructions</a><ul>
<li class="toctree-l3"><a class="reference internal" href="General-Instructions.html#main-objective">Main Objective</a></li>
<li class="toctree-l3"><a class="reference internal" href="General-Instructions.html#complete-exercises">Complete Exercises</a></li>
<li class="toctree-l3"><a class="reference internal" href="General-Instructions.html#run-demo-in-simulation-mode">Run Demo in Simulation Mode</a></li>
<li class="toctree-l3"><a class="reference internal" href="General-Instructions.html#run-demo-on-the-real-robot">Run Demo on the Real Robot</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Load-Parameters.html">Demo 2.3 - Load Parameters</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Load-Parameters.html#locate-exercise-source-file">Locate Exercise Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="Load-Parameters.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Load-Parameters.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Load-Parameters.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Initialize-ROS.html">Demo 2.4 - Initialize ROS</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Initialize-ROS.html#locate-exercise-source-file">Locate Exercise Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="Initialize-ROS.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Initialize-ROS.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Initialize-ROS.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Initialize-Descartes.html">Demo 2.5 - Initialize Descartes</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Initialize-Descartes.html#locate-exercise-source-file">Locate Exercise Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="Initialize-Descartes.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Initialize-Descartes.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Initialize-Descartes.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Move-Home.html">Demo 2.6 - Move Home</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Move-Home.html#locate-exercise-source-file">Locate Exercise Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="Move-Home.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Move-Home.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Move-Home.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Generate-a-Semi-Constrained-Trajectory.html">Demo 2.7 - Generate a Semi-Constrained Trajectory</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Generate-a-Semi-Constrained-Trajectory.html#locate-exercise-source-file">Locate exercise source file</a></li>
<li class="toctree-l3"><a class="reference internal" href="Generate-a-Semi-Constrained-Trajectory.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Generate-a-Semi-Constrained-Trajectory.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Generate-a-Semi-Constrained-Trajectory.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Plan-a-robot-path.html">Demo 2.8 - Plan a Robot Path</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Plan-a-robot-path.html#locate-exercise-source-file">Locate Exercise Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="Plan-a-robot-path.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Plan-a-robot-path.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Plan-a-robot-path.html#api-references">API References</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="Run-a-robot-path.html">Demo 2.9 - Run a Robot Path</a><ul>
<li class="toctree-l3"><a class="reference internal" href="Run-a-robot-path.html#locate-exercise-source-file">Locate Exercise Source File</a></li>
<li class="toctree-l3"><a class="reference internal" href="Run-a-robot-path.html#complete-code">Complete Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="Run-a-robot-path.html#build-code-and-run">Build Code and Run</a></li>
<li class="toctree-l3"><a class="reference internal" href="Run-a-robot-path.html#api-references">API References</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html">Exercise 5.0 - Advanced Descartes Path Planning</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#reference-example">Reference Example</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#setup-workspace">Setup workspace</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#update-your-workcell-xacro-file">Update your workcell.xacro file.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#add-new-planning-group-to-your-moveit-config-package">Add new planning group to your moveit_config package.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#complete-advanced-descartes-node">Complete Advanced Descartes Node</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#update-the-setup-launch-file">Update the setup.launch file.</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Advanced-Descartes-Path-Planning.html#test-full-application">Test Full Application</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html">Exercise 5.1 - Building a Perception Pipeline</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#prepare-new-workspace">Prepare New Workspace:</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#intro-review-existing-code">Intro (Review Existing Code)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#primary-task-filling-in-the-blanks">Primary Task: Filling in the blanks</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#implement-voxel-filter">Implement Voxel Filter</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#viewing-results">Viewing Results</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#implement-pass-through-filters">Implement Pass-through Filters</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#plane-segmentation">Plane Segmentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#euclidean-cluster-extraction-optional-but-recommended">Euclidean Cluster Extraction (optional, but recommended)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#create-a-cropbox-filter">Create a CropBox Filter</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#create-a-statistical-outlier-removal">Create a Statistical Outlier Removal</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#create-a-broadcast-transform">Create a Broadcast Transform</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#create-a-polygonal-segmentation">Create a Polygonal Segmentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Building-a-Perception-Pipeline.html#write-a-launch-file">Write a launch file</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session5/Introduction-to-STOMP.html">Exercise 5.2 - Introduction to STOMP</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#information-and-resources">Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#objectives">Objectives</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#add-stomp">Add STOMP</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#run-moveit-with-stomp">Run MoveIt! with STOMP</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#explore-stomp">Explore STOMP</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#configure-stomp">Configure STOMP</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Introduction-to-STOMP.html#more-info-on-the-stomp-parameters">More info on the STOMP parameters</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html">Exercise 5.3 - Simple PCL Interface for Python</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#prepare-new-workspace">Prepare New Workspace:</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#intro-review-existing-code">Intro (Review Existing Code)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#create-a-python-package">Create a Python Package</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#creating-setup-py">Creating setup.py</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#publishing-the-point-cloud">Publishing the Point Cloud</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#implement-a-voxel-filter">Implement a Voxel Filter</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#viewing-results">Viewing Results</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#implement-pass-through-filters">Implement Pass-Through Filters</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#plane-segmentation">Plane Segmentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#euclidian-cluster-extraction">Euclidian Cluster Extraction</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/Simple-PCL-Interface-for-Python.html#future-study">Future Study</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session5/OpenCV-in-Python.html">Exercise 5.4 - OpenCV Image Processing (Python)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session5/OpenCV-in-Python.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/OpenCV-in-Python.html#further-information-and-resources">Further Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/OpenCV-in-Python.html#problem-statement">Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session5/OpenCV-in-Python.html#implementation">Implementation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session5/OpenCV-in-Python.html#create-package">Create package</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/OpenCV-in-Python.html#create-an-image-publisher">Create an Image Publisher</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/OpenCV-in-Python.html#create-the-detect-pump-image-processing-node">Create the Detect_Pump Image-Processing Node</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session5/OpenCV-in-Python.html#challenge-exercises">Challenge Exercises</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../session6/Documentation-Generation.html">Exercise 6.0 - Documentation Generation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session6/Documentation-Generation.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Documentation-Generation.html#information-and-resources">Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Documentation-Generation.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Documentation-Generation.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session6/Documentation-Generation.html#annotate-the-source-code">Annotate the Source Code</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Documentation-Generation.html#generate-documentation">Generate documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Documentation-Generation.html#view-the-documentation">View the Documentation</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session6/Unit-Testing.html">Exercise 6.1 - Unit Testing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session6/Unit-Testing.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Unit-Testing.html#information-and-resources">Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Unit-Testing.html#problem-statement">Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Unit-Testing.html#guidance">Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session6/Unit-Testing.html#create-the-unit-test-frame-work">Create the unit test frame work</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Unit-Testing.html#add-stock-publisher-tests">Add stock publisher tests</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Unit-Testing.html#write-specific-unit-tests">Write specific unit tests</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html">Exercise 6.2 - Using rqt tools for Analysis</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#information-and-resources">Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#problem-statement">Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#guidance">Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#rqt-graph-view-node-interaction"><code class="docutils literal"><span class="pre">rqt_graph</span></code>: view node interaction</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#rqt-console-view-messages"><code class="docutils literal"><span class="pre">rqt_console</span></code>: view messages:</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Using-rqt-tools-for-analysis.html#rqt-plot-view-data-plots"><code class="docutils literal"><span class="pre">rqt_plot</span></code>: view data plots</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html">Exercise 6.3 - ROS Style Guide and ros_lint</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html#motivation">Motivation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html#information-and-resources">Information and Resources</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html#scan-n-plan-application-problem-statement">Scan-N-Plan Application: Problem Statement</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html#scan-n-plan-application-guidance">Scan-N-Plan Application: Guidance</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html#configure-package">Configure Package</a></li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Style-Guide-and-ros_lint.html#run-roslint">Run roslint</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../session6/Docker-AWS.html">Exercise 6.4 - Introduction to ROS with Docker and Amazon Web Services (AWS)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../session6/Docker-AWS.html#demo-1-run-front-end-gazebo-host-and-back-end-in-docker">Demo #1 - Run front-end Gazebo host and back-end in Docker</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../session6/Docker-AWS.html#setup-workspace">Setup workspace</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../session6/Docker-AWS.html#front-end-run-on-host-and-only-contains-gui">Front-end (run on host and only contains gui)</a></li>
<li class="toctree-l4"><a class="reference internal" href="../session6/Docker-AWS.html#back-end-run-in-container">Back-end (run in container)</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../session6/Docker-AWS.html#running-the-demo">Running the Demo</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../session6/Docker-AWS.html#run-the-front-end">Run the front-end</a></li>
<li class="toctree-l4"><a class="reference internal" href="../session6/Docker-AWS.html#run-the-backend">Run the backend</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Docker-AWS.html#demo-2-run-front-end-on-a-web-server-and-back-end-in-docker">Demo #2 - Run front-end on a web-server and back-end in docker</a></li>
<li class="toctree-l2"><a class="reference internal" href="../session6/Docker-AWS.html#demo-3-robot-web-tools">Demo #3 Robot Web Tools</a></li>
</ul>
</li>
</ul>

          
        
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../../index.html">Industrial Training</a>
      </nav>

      
      <div class="wy-nav-content">

        <div class="header-override">
          <a href="http://rosindustrial.org">
            <img src="../../_static/logo.jpg"/>
          </a>
          <p>
            <a href="http://rosindustrial.org">ROS-Industrial Website</a>|<a href="http://rosindustrial.org/news">Blog</a>
          </p>
        </div>

        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li class="wy-breadcrumbs-aside">
      
        
          <a href="https://github.com/ros-industrial/industrial_training/blob/kinetic/gh_pages/_source/demo2/Application-Structure.md" class="fa fa-github"> Edit on GitHub</a>
        
      
    </li>
    <li><a href="../../index.html">Docs</a> &raquo;</li>
      
          <li><a href="index.html">Application Demo 2 - Descartes Planning and Execution</a> &raquo;</li>
      
    <li>Application Structure</li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             <div class="admonition note">
               <p class="first admonition-title">The code used in this tutorial is available!</p>
               <p class="last">Code can be found at <a href = "https://github.com/ros-industrial/industrial_training">industrial_training repository</a> in gh_pages folder. Use kinetic branch.</p>
             </div>

            
  <div class="section" id="application-structure">
<span id="application-structure"></span><h1>Application Structure<a class="headerlink" href="#application-structure" title="Permalink to this headline">¶</a></h1>
<blockquote>
<div>In this exercise, we’ll take a look at all the packages and files that will be used during the completion of these exercises.</div></blockquote>
<div class="section" id="acquire-and-initialize-the-workspace">
<span id="acquire-and-initialize-the-workspace"></span><h2>Acquire and initialize the Workspace<a class="headerlink" href="#acquire-and-initialize-the-workspace" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">~/</span><span class="n">industrial_training</span><span class="o">/</span><span class="n">exercises</span><span class="o">/</span><span class="n">Descartes_Planning_and_Execution</span>
<span class="n">cp</span> <span class="o">-</span><span class="n">r</span> <span class="n">template_ws</span> <span class="o">~/</span><span class="n">descartes_ws</span>
<span class="n">cd</span> <span class="o">~/</span><span class="n">descartes_ws</span>
<span class="n">source</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">ros</span><span class="o">/</span><span class="n">kinetic</span><span class="o">/</span><span class="n">setup</span><span class="o">.</span><span class="n">bash</span>
<span class="n">catkin</span> <span class="n">init</span>
</pre></div>
</div>
</div>
<div class="section" id="download-source-dependencies">
<span id="download-source-dependencies"></span><h2>Download source dependencies<a class="headerlink" href="#download-source-dependencies" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>Use the <a class="reference external" href="http://wiki.ros.org/wstool">wstool</a> command to download the repositories listed in the <code class="docutils literal"><span class="pre">src/.rosinstall</span></code> file</div></blockquote>
<div class="highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">~/</span><span class="n">descartes_ws</span><span class="o">/</span><span class="n">src</span><span class="o">/</span>
<span class="n">wstool</span> <span class="n">update</span>
</pre></div>
</div>
</div>
<div class="section" id="download-debian-dependencies">
<span id="download-debian-dependencies"></span><h2>Download debian dependencies<a class="headerlink" href="#download-debian-dependencies" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>Make sure you have installed and configured the <a class="reference external" href="http://wiki.ros.org/rosdep">rosdep tool</a>.
Then, run the following command from the <code class="docutils literal"><span class="pre">src</span></code> directory of your workspace.</div></blockquote>
<div class="highlight-default"><div class="highlight"><pre><span class="n">rosdep</span> <span class="n">install</span> <span class="o">--</span><span class="n">from</span><span class="o">-</span><span class="n">paths</span> <span class="o">.</span> <span class="o">--</span><span class="n">ignore</span><span class="o">-</span><span class="n">src</span> <span class="o">-</span><span class="n">y</span>
</pre></div>
</div>
</div>
<div class="section" id="build-your-workspace">
<span id="build-your-workspace"></span><h2>Build your workspace<a class="headerlink" href="#build-your-workspace" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default"><div class="highlight"><pre><span class="n">catkin</span> <span class="n">build</span> <span class="o">--</span><span class="n">cmake</span><span class="o">-</span><span class="n">args</span> <span class="o">-</span><span class="n">G</span> <span class="s1">&#39;CodeBlocks - Unix Makefiles&#39;</span>
</pre></div>
</div>
<blockquote>
<div>If the build fails, then revisit the previous two steps to make sure all the dependencies were downloaded.</div></blockquote>
</div>
<div class="section" id="source-the-workspace">
<span id="source-the-workspace"></span><h2>Source the workspace<a class="headerlink" href="#source-the-workspace" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>Run the following command from your workspace parent directory</div></blockquote>
<div class="highlight-default"><div class="highlight"><pre><span class="n">source</span> <span class="n">devel</span><span class="o">/</span><span class="n">setup</span><span class="o">.</span><span class="n">bash</span>
</pre></div>
</div>
</div>
<div class="section" id="list-all-the-packages-in-the-application">
<span id="list-all-the-packages-in-the-application"></span><h2>List All the Packages in the Application<a class="headerlink" href="#list-all-the-packages-in-the-application" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">~/</span><span class="n">descartes_ws</span><span class="o">/</span><span class="n">src</span>
<span class="n">ls</span> <span class="o">-</span><span class="n">la</span>
</pre></div>
</div>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">plan_and_run</span></code> :           Contains the source code for the <code class="docutils literal"><span class="pre">plan_and_run</span></code> application.  You’ll be completing the exercises by editing source files in this package</li>
<li><code class="docutils literal"><span class="pre">ur5_demo_moveit_config</span></code> : Contains support files for planning and execution robot motions with Moveit.  This package was generated with the Moveit Setup Assistant</li>
<li><code class="docutils literal"><span class="pre">ur5_demo_support</span></code> :       Provides the robot definition as a URDF file.  This URDF is loaded at run time by our <code class="docutils literal"><span class="pre">plan_and_run</span></code> application.</li>
<li><code class="docutils literal"><span class="pre">ur5_demo_descartes</span></code> :     Provides a custom Descartes Robot Model for the UR5 arm.  It uses a Inverse-Kinematics closed form solution; which is significantly faster than the numerical approach used by the <strong>MoveitStateAdapter</strong>.</li>
</ul>
</div>
<div class="section" id="the-plan-and-run-package">
<span id="the-plan-and-run-package"></span><h2>The <code class="docutils literal"><span class="pre">plan_and_run</span></code> package<a class="headerlink" href="#the-plan-and-run-package" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default"><div class="highlight"><pre><span class="n">roscd</span> <span class="n">plan_and_run</span>
<span class="n">ls</span> <span class="o">-</span><span class="n">la</span>
</pre></div>
</div>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">src</span></code> :     Application source files.</li>
<li><code class="docutils literal"><span class="pre">src/demo_application.cpp</span></code> : A class source file that contains the application implementation code.</li>
<li><code class="docutils literal"><span class="pre">src/plan_and_run.cpp</span></code>     : The application main access point. It invokes all the tasks in the application and wraps them inside the “<code class="docutils literal"><span class="pre">main</span></code>” routine.</li>
<li><code class="docutils literal"><span class="pre">src/tasks</span></code>                : A directory that contains all of the source files that you’ll be editing or completing as you make progress through the exercises.</li>
<li><code class="docutils literal"><span class="pre">include</span></code> : Header files</li>
<li><code class="docutils literal"><span class="pre">include/plan_and_run/demo_application.h</span></code> : Defines the application skeleton and provides a number of global variables for passing data at various points in the exercises.</li>
<li><code class="docutils literal"><span class="pre">launch</span></code>: Launch files needed to run the application</li>
<li><code class="docutils literal"><span class="pre">launch/demo_setup.launch</span></code> : Loads <code class="docutils literal"><span class="pre">roscore</span></code>, <code class="docutils literal"><span class="pre">moveit</span></code> and the runtime resources needed by our application.</li>
<li><code class="docutils literal"><span class="pre">launch/demo_run.launch</span></code> : Starts our application main executable as a ROS node.</li>
<li><code class="docutils literal"><span class="pre">config</span></code>: Directory that contains non-critical configuration files.</li>
</ul>
</div>
<div class="section" id="main-application-source-file">
<span id="main-application-source-file"></span><h2>Main Application Source File<a class="headerlink" href="#main-application-source-file" title="Permalink to this headline">¶</a></h2>
<p>In the “<code class="docutils literal"><span class="pre">plan_and_run/src/plan_and_run_node.cpp</span></code>” you’ll find the following code:</p>
<div class="highlight-c++"><div class="highlight"><pre><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span><span class="kt">char</span><span class="o">**</span> <span class="n">argv</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">ros</span><span class="o">::</span><span class="n">init</span><span class="p">(</span><span class="n">argc</span><span class="p">,</span><span class="n">argv</span><span class="p">,</span><span class="s">&quot;plan_and_run&quot;</span><span class="p">);</span>
  <span class="n">ros</span><span class="o">::</span><span class="n">AsyncSpinner</span> <span class="n">spinner</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span>
  <span class="n">spinner</span><span class="p">.</span><span class="n">start</span><span class="p">();</span>

  <span class="c1">// creating application</span>
  <span class="n">plan_and_run</span><span class="o">::</span><span class="n">DemoApplication</span> <span class="n">application</span><span class="p">;</span>

  <span class="c1">// loading parameters</span>
  <span class="n">application</span><span class="p">.</span><span class="n">loadParameters</span><span class="p">();</span>

  <span class="c1">// initializing ros components</span>
  <span class="n">application</span><span class="p">.</span><span class="n">initRos</span><span class="p">();</span>

  <span class="c1">// initializing descartes</span>
  <span class="n">application</span><span class="p">.</span><span class="n">initDescartes</span><span class="p">();</span>

  <span class="c1">// moving to home position</span>
  <span class="n">application</span><span class="p">.</span><span class="n">moveHome</span><span class="p">();</span>

  <span class="c1">// generating trajectory</span>
  <span class="n">plan_and_run</span><span class="o">::</span><span class="n">DescartesTrajectory</span> <span class="n">traj</span><span class="p">;</span>
  <span class="n">application</span><span class="p">.</span><span class="n">generateTrajectory</span><span class="p">(</span><span class="n">traj</span><span class="p">);</span>


  <span class="c1">// planning robot path</span>
  <span class="n">plan_and_run</span><span class="o">::</span><span class="n">DescartesTrajectory</span> <span class="n">output_path</span><span class="p">;</span>
  <span class="n">application</span><span class="p">.</span><span class="n">planPath</span><span class="p">(</span><span class="n">traj</span><span class="p">,</span><span class="n">output_path</span><span class="p">);</span>

  <span class="c1">// running robot path</span>
  <span class="n">application</span><span class="p">.</span><span class="n">runPath</span><span class="p">(</span><span class="n">output_path</span><span class="p">);</span>

  <span class="c1">// exiting ros node</span>
  <span class="n">spinner</span><span class="p">.</span><span class="n">stop</span><span class="p">();</span>

  <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>In short, this program will run through each exercise by calling the corresponding function from the <code class="docutils literal"><span class="pre">application</span></code> object.  For instance, in order to initialize Descartes the program calls <code class="docutils literal"><span class="pre">application.iniDescartes()</span></code>.  Thus each exercise consists of editing the source file where that exercise is implemented, so for <code class="docutils literal"><span class="pre">application.initDescartes()</span></code> you’ll be editing the <code class="docutils literal"><span class="pre">plan_and_run/src/tasks/init_descartes.src</span></code> source file.</p>
</div>
<div class="section" id="the-demoapplication-class">
<span id="the-demoapplication-class"></span><h2>The DemoApplication Class<a class="headerlink" href="#the-demoapplication-class" title="Permalink to this headline">¶</a></h2>
<p>In the header file “<code class="docutils literal"><span class="pre">plan_and_run/include/plan_and_run/demo_application.h</span></code>” you’ll find the definition for the application’s main class along with several support constructs. Some of the important components to take notice of are as follows:</p>
<ul class="simple">
<li>Program Variables: Contain hard coded values that are used at various points in the application.</li>
</ul>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">ROBOT_DESCRIPTION_PARAM</span> <span class="o">=</span> <span class="s">&quot;robot_description&quot;</span><span class="p">;</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">EXECUTE_TRAJECTORY_ACTION</span> <span class="o">=</span> <span class="s">&quot;execute_trajectory&quot;</span><span class="p">;</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">VISUALIZE_TRAJECTORY_TOPIC</span> <span class="o">=</span> <span class="s">&quot;visualize_trajectory_curve&quot;</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">double</span> <span class="n">SERVER_TIMEOUT</span> <span class="o">=</span> <span class="mf">5.0f</span><span class="p">;</span> <span class="c1">// seconds</span>
<span class="k">const</span> <span class="kt">double</span> <span class="n">ORIENTATION_INCREMENT</span> <span class="o">=</span> <span class="mf">0.5f</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">double</span> <span class="n">EPSILON</span> <span class="o">=</span> <span class="mf">0.0001f</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">double</span> <span class="n">AXIS_LINE_LENGHT</span> <span class="o">=</span> <span class="mf">0.01</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">double</span> <span class="n">AXIS_LINE_WIDTH</span> <span class="o">=</span> <span class="mf">0.001</span><span class="p">;</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">PLANNER_ID</span> <span class="o">=</span> <span class="s">&quot;RRTConnectkConfigDefault&quot;</span><span class="p">;</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">HOME_POSITION_NAME</span> <span class="o">=</span> <span class="s">&quot;home&quot;</span><span class="p">;</span>
</pre></div>
</div>
<ul class="simple">
<li>Trajectory Type: Convenience type that represents an array of Descartes Trajectory Points.</li>
</ul>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">descartes_core</span><span class="o">::</span><span class="n">TrajectoryPtPtr</span><span class="o">&gt;</span> <span class="n">DescartesTrajectory</span><span class="p">;</span>
</pre></div>
</div>
<ul class="simple">
<li><strong>DemoConfiguration Data Structure</strong>:  Provides variables whose values are initialize at run-time from corresponding ros parameters.</li>
</ul>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">struct</span> <span class="n">DemoConfiguration</span>
<span class="p">{</span>
  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">group_name</span><span class="p">;</span>                 <span class="cm">/* Name of the manipulation group containing the relevant links in the robot */</span>
  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">tip_link</span><span class="p">;</span>                   <span class="cm">/* Usually the last link in the kinematic chain of the robot */</span>
  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">base_link</span><span class="p">;</span>                  <span class="cm">/* The name of the base link of the robot */</span>
  <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">world_frame</span><span class="p">;</span>                <span class="cm">/* The name of the world link in the URDF file */</span>
  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span> <span class="n">joint_names</span><span class="p">;</span>   <span class="cm">/* A list with the names of the mobile joints in the robot */</span>


  <span class="cm">/* Trajectory Generation Members:</span>
<span class="cm">   *  Used to control the attributes (points, shape, size, etc) of the robot trajectory.</span>
<span class="cm">   *  */</span>
  <span class="kt">double</span> <span class="n">time_delay</span><span class="p">;</span>              <span class="cm">/* Time step between consecutive points in the robot path */</span>
  <span class="kt">double</span> <span class="n">foci_distance</span><span class="p">;</span>           <span class="cm">/* Controls the size of the curve */</span>
  <span class="kt">double</span> <span class="n">radius</span><span class="p">;</span>                  <span class="cm">/* Controls the radius of the sphere on which the curve is projected */</span>
  <span class="kt">int</span> <span class="n">num_points</span><span class="p">;</span>                 <span class="cm">/* Number of points per curve */</span>
  <span class="kt">int</span> <span class="n">num_lemniscates</span><span class="p">;</span>            <span class="cm">/* Number of curves*/</span>
  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span> <span class="n">center</span><span class="p">;</span>     <span class="cm">/* Location of the center of all the lemniscate curves */</span>
  <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span> <span class="n">seed_pose</span><span class="p">;</span>  <span class="cm">/* Joint values close to the desired start of the robot path */</span>

  <span class="cm">/*</span>
<span class="cm">   * Visualization Members</span>
<span class="cm">   * Used to control the attributes of the visualization artifacts</span>
<span class="cm">   */</span>
  <span class="kt">double</span> <span class="n">min_point_distance</span><span class="p">;</span>      <span class="cm">/* Minimum distance between consecutive trajectory points. */</span>
<span class="p">};</span>
</pre></div>
</div>
<ul class="simple">
<li><strong>DemoApplication Class</strong>:  Main component of the application which provides functions for each step in our program.  It also contains several constructs that turn this application into a ROS node.</li>
</ul>
<div class="highlight-c++"><div class="highlight"><pre><span class="k">class</span> <span class="nc">DemoApplication</span>
<span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
  <span class="cm">/*  Constructor</span>
<span class="cm">   *    Creates an instance of the application class</span>
<span class="cm">   */</span>
  <span class="n">DemoApplication</span><span class="p">();</span>
  <span class="k">virtual</span> <span class="o">~</span><span class="n">DemoApplication</span><span class="p">();</span>

  <span class="cm">/* Main Application Functions</span>
<span class="cm">   *  Functions that allow carrying out the various steps needed to run a</span>
<span class="cm">   *  plan an run application.  All these functions will be invoked from within</span>
<span class="cm">   *  the main routine.</span>
<span class="cm">   */</span>

  <span class="kt">void</span> <span class="nf">loadParameters</span><span class="p">();</span>
  <span class="kt">void</span> <span class="nf">initRos</span><span class="p">();</span>
  <span class="kt">void</span> <span class="nf">initDescartes</span><span class="p">();</span>
  <span class="kt">void</span> <span class="nf">moveHome</span><span class="p">();</span>
  <span class="kt">void</span> <span class="nf">generateTrajectory</span><span class="p">(</span><span class="n">DescartesTrajectory</span><span class="o">&amp;</span> <span class="n">traj</span><span class="p">);</span>
  <span class="kt">void</span> <span class="nf">planPath</span><span class="p">(</span><span class="n">DescartesTrajectory</span><span class="o">&amp;</span> <span class="n">input_traj</span><span class="p">,</span><span class="n">DescartesTrajectory</span><span class="o">&amp;</span> <span class="n">output_path</span><span class="p">);</span>
  <span class="kt">void</span> <span class="nf">runPath</span><span class="p">(</span><span class="k">const</span> <span class="n">DescartesTrajectory</span><span class="o">&amp;</span> <span class="n">path</span><span class="p">);</span>

<span class="k">protected</span><span class="o">:</span>

  <span class="cm">/* Support methods</span>
<span class="cm">   *  Called from within the main application functions in order to perform convenient tasks.</span>
<span class="cm">   */</span>

  <span class="k">static</span> <span class="kt">bool</span> <span class="n">createLemniscateCurve</span><span class="p">(</span><span class="kt">double</span> <span class="n">foci_distance</span><span class="p">,</span> <span class="kt">double</span> <span class="n">sphere_radius</span><span class="p">,</span>
                                    <span class="kt">int</span> <span class="n">num_points</span><span class="p">,</span> <span class="kt">int</span> <span class="n">num_lemniscates</span><span class="p">,</span>
                                    <span class="k">const</span> <span class="n">Eigen</span><span class="o">::</span><span class="n">Vector3d</span><span class="o">&amp;</span> <span class="n">sphere_center</span><span class="p">,</span>
                                    <span class="n">EigenSTL</span><span class="o">::</span><span class="n">vector_Affine3d</span><span class="o">&amp;</span> <span class="n">poses</span><span class="p">);</span>

  <span class="kt">void</span> <span class="nf">fromDescartesToMoveitTrajectory</span><span class="p">(</span><span class="k">const</span> <span class="n">DescartesTrajectory</span><span class="o">&amp;</span> <span class="n">in_traj</span><span class="p">,</span>
                                              <span class="n">trajectory_msgs</span><span class="o">::</span><span class="n">JointTrajectory</span><span class="o">&amp;</span> <span class="n">out_traj</span><span class="p">);</span>

  <span class="kt">void</span> <span class="nf">publishPosesMarkers</span><span class="p">(</span><span class="k">const</span> <span class="n">EigenSTL</span><span class="o">::</span><span class="n">vector_Affine3d</span><span class="o">&amp;</span> <span class="n">poses</span><span class="p">);</span>


<span class="k">protected</span><span class="o">:</span>

  <span class="cm">/* Application Data</span>
<span class="cm">   *  Holds the data used by the various functions in the application.</span>
<span class="cm">   */</span>
  <span class="n">DemoConfiguration</span> <span class="n">config_</span><span class="p">;</span>



  <span class="cm">/* Application ROS Constructs</span>
<span class="cm">   *  Components needed to successfully run a ros-node and perform other important</span>
<span class="cm">   *  ros-related tasks</span>
<span class="cm">   */</span>
  <span class="n">ros</span><span class="o">::</span><span class="n">NodeHandle</span> <span class="n">nh_</span><span class="p">;</span>                        <span class="cm">/* Object used for creating and managing ros application resources*/</span>
  <span class="n">ros</span><span class="o">::</span><span class="n">Publisher</span> <span class="n">marker_publisher_</span><span class="p">;</span>           <span class="cm">/* Publishes visualization message to Rviz */</span>
  <span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">actionlib</span><span class="o">::</span><span class="n">SimpleActionClient</span><span class="o">&lt;</span><span class="n">moveit_msgs</span><span class="o">::</span><span class="n">ExecuteTrajectoryAction</span><span class="o">&gt;&gt;</span>   <span class="n">moveit_run_path_client_ptr_</span><span class="p">;</span> <span class="cm">/* Sends a robot trajectory to moveit for execution */</span>



  <span class="cm">/* Application Descartes Constructs</span>
<span class="cm">   *  Components accessing the path planning capabilities in the Descartes library</span>
<span class="cm">   */</span>
  <span class="n">descartes_core</span><span class="o">::</span><span class="n">RobotModelPtr</span> <span class="n">robot_model_ptr_</span><span class="p">;</span> <span class="cm">/* Performs tasks specific to the Robot</span>
<span class="cm">                                                     such IK, FK and collision detection*/</span>
  <span class="n">descartes_planner</span><span class="o">::</span><span class="n">SparsePlanner</span> <span class="n">planner_</span><span class="p">;</span>      <span class="cm">/* Plans a smooth robot path given a trajectory of points */</span>

<span class="p">};</span>
</pre></div>
</div>
</div>
<div class="section" id="application-launch-file">
<span id="application-launch-file"></span><h2>Application Launch File<a class="headerlink" href="#application-launch-file" title="Permalink to this headline">¶</a></h2>
<p>This file starts our application as a ROS node and loads up the necessary parameters into the ROS parameter server. Observe how this is done by opening the “<code class="docutils literal"><span class="pre">plan_and_run/launch/demo_run.launch</span></code>” file:</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt">&lt;launch&gt;</span>
  <span class="nt">&lt;node</span> <span class="na">name=</span><span class="s">&quot;plan_and_run_node&quot;</span> <span class="na">type=</span><span class="s">&quot;plan_and_run_node&quot;</span> <span class="na">pkg=</span><span class="s">&quot;plan_and_run&quot;</span> <span class="na">output=</span><span class="s">&quot;screen&quot;</span><span class="nt">&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;group_name&quot;</span> <span class="na">value=</span><span class="s">&quot;manipulator&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;tip_link&quot;</span> <span class="na">value=</span><span class="s">&quot;tool&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;base_link&quot;</span> <span class="na">value=</span><span class="s">&quot;base_link&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;world_frame&quot;</span> <span class="na">value=</span><span class="s">&quot;world&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;trajectory/time_delay&quot;</span> <span class="na">value=</span><span class="s">&quot;0.1&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;trajectory/foci_distance&quot;</span> <span class="na">value=</span><span class="s">&quot;0.07&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;trajectory/radius&quot;</span> <span class="na">value=</span><span class="s">&quot;0.08&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;trajectory/num_points&quot;</span> <span class="na">value=</span><span class="s">&quot;200&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;trajectory/num_lemniscates&quot;</span> <span class="na">value=</span><span class="s">&quot;4&quot;</span><span class="nt">/&gt;</span>
    <span class="nt">&lt;rosparam</span> <span class="na">param=</span><span class="s">&quot;trajectory/center&quot;</span><span class="nt">&gt;</span>[0.36, 0.2, 0.1]<span class="nt">&lt;/rosparam&gt;</span>
    <span class="nt">&lt;rosparam</span> <span class="na">param=</span><span class="s">&quot;trajectory/seed_pose&quot;</span><span class="nt">&gt;</span>[0.0, -1.03, 1.57 , -0.21, 0.0, 0.0]<span class="nt">&lt;/rosparam&gt;</span>
    <span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;visualization/min_point_distance&quot;</span> <span class="na">value=</span><span class="s">&quot;0.02&quot;</span><span class="nt">/&gt;</span>
  <span class="nt">&lt;/node&gt;</span>
<span class="nt">&lt;/launch&gt;</span>
</pre></div>
</div>
<ul class="simple">
<li>Some of the important parameters are explained as follows:</li>
<li>group_name: A namespace that points to the list of links in the robot that are included in the arm’s kinematic chain (base to end-of-tooling links).  This list is defined in the <code class="docutils literal"><span class="pre">ur5_demo_moveit_config</span></code> package.</li>
<li>tip_link: Name of the last link in the kinematic chain, usually the tool link.</li>
<li>base_link: Name for the base link of the robot.</li>
<li>world_frame: The absolute coordinate frame of reference for all the objects defined in the planning environment.</li>
<li>The parameters under the “<code class="docutils literal"><span class="pre">trajectory</span></code>” namespace are used to generate the trajectory that is feed into the Descartes planner.</li>
<li>trajectory/seed_pose: This is of particular importance because it is used to indicate preferred start and end joint configurations of the robot when planning the path.  If a ‘’seed_pose’’ wasn’t specified then planning would take longer since multiple start and end joint configurations would have to be taken into account, leading to multiple path solutions that result from combining several start and end poses.</li>
</ul>
</div>
</div>


            
            <div class="admonition note">
              <p class="first admonition-title">Open Source Feedback</p>
              <p class="last">See something that needs improvement? Please open a pull request on this <a href="https://github.com/ros-industrial/industrial_training/blob/kinetic/gh_pages/_source/demo2/Application-Structure.md" class="fa fa-github"> GitHub page</a></p>
            </div>
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="General-Instructions.html" class="btn btn-neutral float-right" title="General Instructions" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="Introduction.html" class="btn btn-neutral" title="Introduction" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div class="footer-override">
    <a href="http://rosindustrial.org/ric">
      <img src="../../_static/footer.jpg"/>
    </a>
  </div>

  <div role="contentinfo">
    <p>
    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.

</footer>
        </div>
      </div>

    </section>

  </div>
  <script>
  var pre = document.getElementsByTagName('pre');
  for (var i = 0; i < pre.length; i++) {
    var button = document.createElement('button');
    button.className = 'btn-copyboard fa fa-copy btn';
    pre[i].before(button);
  }

  var clipboard = new Clipboard('.btn-copyboard', {
    target: function(trigger) {return trigger.nextElementSibling;}
  });

  function showSuccess(elem){elem.setAttribute('class','btn-copyboard fa fa-check btn');}
  function sleep (time) {
    return new Promise((resolve) => setTimeout(resolve, time));
  }
  clipboard.on('success',function(e){
    showSuccess(e.trigger);
    sleep(350).then(() => {e.clearSelection();
      e.trigger.setAttribute('class','btn-copyboard fa fa-copy btn');})
  });
  </script>

  
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
    <span class="rst-current-version" data-toggle="rst-current-version">
        <span class="fa fa-book"> Other Versions</span>
        v: kinetic
        <span class="fa fa-caret-down"></span>
    </span>
    <div class="rst-other-versions">
        <dl>
            <dt>Branches</dt>
            <dd><a href="../../kinetic/_source/demo2/Application-Structure.html">kinetic</a></dd>
        </dl>
    </div>
</div>


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../../',
            VERSION:'',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="../../_static/jquery.js"></script>
      <script type="text/javascript" src="../../_static/underscore.js"></script>
      <script type="text/javascript" src="../../_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="../../_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>